package com.szu.subject.ui.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.szu.subject.domains.Course;
import com.szu.subject.domains.User;
/**
 * 
 * @author Shenxiaolin
 *
 */
@Mapper
public interface CourseMapper {
		
	public Course getCourseByPK(Long id);/*根据课程ID,返回课程*/

	public Course getCourseByAccount(String account);
	
	public List<Course> getCourseByName(String courseName);/*根据课程名称,返回课程*/

	public List<Course> getCoursesByCollege(Long collegeId);/*根据学院ID,返回学院开设课程*/
	
	public List<Course> getCoursesByTeacherName(String teacherName);/*根据老师名称,返回课程*/
	
	public List<Course> getCoursesByTime(String time);
	
	public List<Course> getAllCourses();

	public int createCourse(Course course);
	
	public int updateCourse(Course course);
	
	public int deleteCourse(Long id);
	
	public int batchcreateCourses(List<Course> courses);
	
	public int batchupdateCourses(List<Course> courses);
	
	public int batchdeleteCourses(List<Long> id);
	
	/**
	 * 查看某课程的选课情况
	 * @param id 课程id
	 * @return
	 */
	public Map selectLimit(Long id);

	public List<Course> getCoursesByClassTime(String classTime);

	public List<Course> getCoursesByPKList(List<Long> coursesId);
}
